﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace WFCSharp_I
{
    class Student : INotifyPropertyChanged
    {
        private string name;
        public string Name
        {
            get { return name; }
            set
            {
                name = value;
                if (PropertyChanged != null)
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Name"));
            }
        }

        private float score;
        public float Score
        {
            get { return score; }
            set
            {
                score = value;
                if (PropertyChanged != null)
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Score"));
            }
        }

        public Student()
        {
        }

        public Student(string _name, float _score)
        {
            this.name = _name;
            this.score = _score;
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}
